const $hour = $("#hour");
const $minute = $("#minute");
const $second = $("#second");

getTime();
function getTime() {
  // 获取当前时间并分类
  const now = new Date();
  // console.log(now);
  // 时间
  const h = now.getHours();
  const m = now.getMinutes();
  const s = now.getSeconds();
  // console.log(h, m, s);
  // 角度
  const s_deg = (s / 60) * 360;
  const m_deg = ((m + s / 60) / 60) * 360;
  const h_deg = ((h + (m + s / 60) / 60) / 12) * 360;
  $hour.css("transform", "rotate(" + h_deg + "deg)");
  $minute.css("transform", "rotate(" + m_deg + "deg)");
  $second.css("transform", "rotate(" + s_deg + "deg)");
}

setInterval(getTime, 1000);
